<template>
	<page-navbar title="Game">
		<template #right>
			<view class="nav_right" @click="clickMoney">
				<up-icon name="heart" color="#fff" size="28" v-if="true"></up-icon>
			</view>
		</template>
	</page-navbar>
	<view class="container">
		<view class="header">
			<view class="h_tip">PG SOFT</view>
			<view class="game_name">Shaolin Soccer</view>
			<view class="score">
				<view class="icon_img">
					<up-icon name="star" color="#fff" size="28" style="margin-right: 20rpx" v-if="true"></up-icon>
					<up-icon name="star-fill" color="#FFC120" style="margin-right: 20rpx" size="28" v-else></up-icon>
					<up-icon name="heart" color="#fff" size="28" style="margin-right: 20rpx" v-if="true"></up-icon>
					<up-icon name="heart-fill" color="#FFC120" style="margin-right: 20rpx" size="28" v-else></up-icon>
				</view>
				<view class="btn">
					<up-button color="#0ACF83" :customStyle="btnStyle">
						<image class="btn_icon" src="@/static/images/search/btn_img.png" mode=""></image>
						<view class="btn_text">Entrar</view>
					</up-button>
				</view>
			</view>
			<view class="conten">
				<up-tabs
					:list="filterList"
					@click="clickFilter"
					lineWidth="30"
					lineColor="#10AD6B"
					:current="current"
					:activeStyle="{
						color: '#FFFFFF',
						fontWeight: 'bold',
						transform: 'scale(1.05)'
					}"
					:inactiveStyle="{
						color: '#606266',
						transform: 'scale(1)'
					}"
					itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;padding-bottom:12px"
				></up-tabs>

				<view class="main">
					<overview v-if="current == 0"></overview>
					<features v-else-if="current == 1"></features>
					<specification v-else></specification>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';

import overview from './components/overview.vue';
import features from './components/features.vue';
import specification from './components/specification.vue';

const current = ref(0);

const filterList = [{ name: 'Overview' }, { name: 'Features' }, { name: 'Specification' }];

const btnStyle = {
	height: '88rpx',
	borderRadius: '20rpx',
	fontSize: '32rpx',
	color: '#333',
	fontWeight: 700
};

onMounted(() => {});

const clickFilter = (e) => {
	current.value = e.index;
};
</script>

<style lang="scss" scoped>
.container {
	background-color: #19191f;
	width: 100vw;
	padding: 0 32rpx;
	box-sizing: border-box;
	.header {
		margin-top: 36rpx;
		.h_tip {
			font-size: 32rpx;
			line-height: 40rpx;
			color: #0acf83;
			font-weight: 700;
		}
		.game_name {
			margin-top: 12rpx;
			font-size: 56rpx;
			line-height: 72rpx;
			font-weight: 700;
		}
		.score {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 36rpx;
			.icon_img {
				display: flex;
				align-items: center;
			}
			.btn {
				width: 290rpx;
				.btn_icon {
					width: 48rpx;
					height: 48rpx;
					display: block;
					margin-right: 20rpx;
				}
				.btn_text {
					font-size: 32rpx;
					line-height: 40rpx;
					color: #fff;
				}
			}
		}
		.conten {
			margin-top: 112rpx;
			.main {
				margin-top: 24rpx;
			}
		}
	}
}
</style>
